
function getQuery(name) {
  var search = location.search.substring(1);
  var params = search.split('&');
  for (var i = 0; i < params.length; i++) {
    var ele = params[i].split('=');
    if (ele[0] == name) {
      return ele[1]
    }
  }
  return null
}


function getQueryObject() {
  var search = location.search.substring(1);
  var params = search.split('&');
  var r = {};
  for (var i = 0; i < params.length; i++) {
    var ele = params[i].split('=');
    r[ele[0]] = ele[1];
  }
  return r
}

